package com.gamefx.fte
{
	import flash.events.Event;

	/**
	 * TextComponent's event
	 * @author feather
	 */
	public class TextComponentEvent extends Event
	{
		//--------------------------------------------------------------------------
		//
		//  Class constants
		//
		//--------------------------------------------------------------------------

		/**
		 * 当点击链接文本时触发
		 * @default
		 */
		public static const ITEM_CLICK:String = 'item_click';

		//--------------------------------------------------------------------------
		//
		//  Class properties
		//
		//--------------------------------------------------------------------------

		//--------------------------------------------------------------------------
		//
		//  Constructor
		//
		//--------------------------------------------------------------------------

		/**
		 * 构造
		 * @param type
		 * @param text
		 * @param data
		 * @param bubbles
		 * @param cancelable
		 */
		public function TextComponentEvent(type:String, text:String, data:String, bubbles:Boolean = false, cancelable:Boolean = false)
		{
			super(type, bubbles, cancelable);
			_text = text;
			_data = data;
		}

		//--------------------------------------------------------------------------
		//
		//  Variables
		//
		//--------------------------------------------------------------------------

		//----------------------------------
		//  text
		//----------------------------------

		private var _text:String;

		/**
		 * 文本
		 * @return
		 */
		public function get text():String
		{
			return _text;
		}

		//----------------------------------
		//  data
		//----------------------------------

		private var _data:String;

		/**
		 * 数据
		 * @return
		 */
		public function get data():String
		{
			return _data;
		}

		//--------------------------------------------------------------------------
		//
		//  Methods
		//
		//--------------------------------------------------------------------------

		/**
		 * 克隆（禁用）
		 * @return	this
		 */
		override public function clone():Event
		{
			return this;
		}
	}
}